<body>
  <?php $p = new Profiler('Photo page load', 2, 5); ?>
  
      <div id="leftcontent"></div>

      <div id="centercontent">
        <div id='page_header'>
          <span id='page_title'><?php $photo->title(); ?></span>
          <span id='page_nav'>
          	<?php
          		 $photo->get_photo_id();
          		 $photo->next_page_link($photo->photoList, 'prev ') . $photo->previous_page_link($photo->photoList, 'next');
          	?>
          </span>
        </div>
        <div id='page'>        

          <!-- Build the photo detail floating div -->
          <div id='info_comments'>             
          		 <div align='right'><a id='info_comments_close' href='#'>[Close]</a></div>          		               
                 <div class='heading'><?php $photo->title(); ?></div>
             
                 <div class='thumb'>
                    <?php $photo->img(null, 'Thumbnail');?>
                    <?php $photo->description(); ?>
                 </div>
              
                 <div class='tags'>
                    <div class='heading'>tags</div>
                    <?php $photo->tags_list(null, ' ', ' '); ?>
                 </div>
                          
                 <div class='exif'>
                    <div class='heading'>exif</div>
                    <?php $photo->exif(); ?>
                 </div>
        
                 <div class='license'>
                    <div class='heading'>license</div>
                    <?php $photo->license_link(); ?>
                 </div>

                 <div class='comments'>
                    <div class='heading'>comments</div>
                    <?php $photo->comments_list(); ?>
                 </div>          
                 <br/>    
           </div>

           
        <!-- Show the photo and link the photo to the previous photo -->
        <span id='photo'>
           <?php 
           	if ( $photo->paramPhotoId ) {
           		$photo->img(); 
           	} else {
           		$photo->next_page_link($photo->photoList, $photo->get_img() );
           	}
           	?>
        </span>
        
        </div>
        
        <div id='page_meta'>
          <span style='float:left'><?php $photo->dateposted(); ?></span>
          <span style='float:right'>
             <a id='info_comments_toggle' name='info_comments_toggle' href='#'>
                Details &amp; Comments (<?php $photo->comments_count();?>)
             </a>
          </span>
        </div>

      </div>
      
      <div id="rightcontent"></div>      

<script type='text/javascript'>
   window.addEvent('domready', function(){
   
      var el = $('info_comments');
      $('info_comments_toggle').addEvent('click', function(e){
         el.fade(0.9);
      });
      $('info_comments_close').addEvent('click', function(e){
      	el.fade(0);
     });
    
   })
</script>
  